#!/usr/bin/bash

path=`cd "$( dirname ${BASH_SOURCE[0]} )" && pwd`
cd $path
source config.sh



#是否安装过依赖
if [[ ! -f $system_bin/export.sh ]];then
	source setup.sh
fi




echo ==================================
#检测系统类型
source $bin/get_platform.sh
echo ==================================
echo 欢迎使用开发环境管理脚本
echo 请选择您需要的操作
echo 1.安装开发环境
echo 2.修改环境变量"(未完成)"
echo 3.清理环境缓存
echo 4.卸载开发工具
echo 5.为本脚本添加环境变量
echo 6.为本脚本安装依赖环境
echo 7.清理下载文件
echo ==================================
read -p "请选择：" op
if [[ $op = 1 ]];then
    source ./install.sh
elif [[ $op = 2 ]];then
    source ./env.sh
elif [[ $op = 3 ]];then
    source ./uncache.sh
elif [[ $op = 4 ]];then
    source ./uninstall.sh
elif [[ $op = 5 ]];then
    source ./bin/bin.sh
elif [[ $op = 6 ]];then
    source ./bin/rely.sh
elif [[ $op = 7 ]];then
    sudo rm -rf tmp/*
fi
#sudo chmod -R 777 *
